package August;

import java.util.LinkedList;
import java.util.Queue;
import java.util.Scanner;

public class Day0822 {
    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (true){
            int n = scanner.nextInt();
            int m = scanner.nextInt();

            if (m==0 || n==0)
                return;

            String str = scanner.nextLine();
            char[][] ch = new char[m][n];

            for (int i = 0; i < m; i++) {
                str = scanner.nextLine();
                ch[i] = str.toCharArray();
            }

            eds:
            for (int i = 0; i < m; i++) {
                for (int j = 0; j < n; j++) {
                    if (ch[i][j] == '@'){
                        bfs(ch,i,j);
                        break eds;
                    }
                }
            }
            int res = 0;
            for (int i = 0; i < m; i++) {
                for (int j = 0; j < n; j++) {
                    if (ch[i][j] == '1')
                        res++;
                }
            }
            System.out.println(res);
        }
    }

    private static void bfs(char[][] ch, int i, int j) {
        ch[i][j] = '1';

        int dx[] = {-1,1,0,0};
        int dy[] = {0,0,-1,1};

        Queue<Integer> qux = new LinkedList<>();
        Queue<Integer> quy = new LinkedList<>();

        qux.offer(i);
        quy.offer(j);

        int x = 0;
        int y = 0;
        while (!qux.isEmpty()){
            for (int k = 0; k < 4; k++) {
                x = (int) qux.peek()+dx[k];
                y = (int) quy.peek()+dy[k];

                if (x>=0 && x<ch.length && y>=0 && y<ch[k].length && ch[x][y] == '.'){
                    ch[x][y] = '1';
                    qux.offer(x);
                    quy.offer(y);
                }
            }
            qux.poll();
            quy.poll();
        }
    }


    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()){
            int n = scanner.nextInt();
            int m = scanner.nextInt();
            int k = scanner.nextInt();

            double[][] dp = new double[n+1][m+1];
            double[][] map = new double[n+1][m+1];

            while (k!=0){
                int i = scanner.nextInt();
                int j = scanner.nextInt();
                map[i][j] = 1.0;
                k--;
            }

            dp[1][1] = 1.0;

            for (int i = 1; i <= n ; i++) {
                for (int j = 1; j <= m ; j++) {
                    if ((i!=1) || (j!=1))
                        dp[i][j] = dp[i - 1][j] * (j == m ? 1.0 : 0.5) + dp[i][j - 1] * (i == n ? 1.0 : 0.5);
                    if (map[i][j] == 1.0)
                        dp[i][j] = 0.0;
                }
            }
            System.out.printf("%.2f\n",dp[n][m]);
        }
    }
}

